import { request } from 'umi';
import { ICarsHome } from '@/utils/interface';

// 获取全部汽车品牌接口
export function getCarsHome() {
  return request('https://baojia.chelun.com/v2-car-getMasterBrandList.html');
}

// 汽车车系数据
export function getCarBrand(id: string) {
  return request(
    'https://baojia.chelun.com/v2-car-getMakeListByMasterBrandId.html',
    {
      method: 'GET',
      params: {
        MasterID: id,
      },
    },
  );
}
//汽车车系详情
export function getBaojia(id: any) {
  console.log(id)
  return request('https://baojia.chelun.com/v2-car-getInfoAndListById.html', {
    params: {
      SerialID: id
    }
  })
}
